package com.sm.service;

import com.sm.entity.Attendance;
import com.sm.entity.AttendanceRec;
import org.omg.PortableInterceptor.INACTIVE;
import org.springframework.format.annotation.DateTimeFormat;

import java.util.Date;
import java.util.List;

public interface AttendanceService {

    /**
     * @return 获取当天打卡比例
     * @throws Exception 所有异常
     */
    public AttendanceRec atNow()throws Exception;

    /**
     * @return 获取最近七天的打卡记录
     * @throws Exception 所有异常
     */
    public List<AttendanceRec> atRecently()throws Exception;

    /**
     * @param uid 员工uid
     * @return 返回员工的当月所有考勤记录
     * @throws Exception 所有异常
     */
    //根据uid查询打卡记录
    public List<Attendance> searchOneByUid(Integer uid)throws Exception;

    /**
     * @param uid  员工uid
     * @param sign 上班 还是下班
     * @throws Exception 所有异常
     */
    //上下班打卡 创建当日考勤表
    public void signIn(Integer uid,Integer sign)throws Exception;

    /**
     * @param uid  员工uid
     * @return 返回打卡记录
     * @throws Exception 所有异常
     */
    public List<Boolean> isSign(Integer uid)throws Exception;

    /**
     * @param uid 员工uid
     * @param sign 加班时长
     * @throws Exception 所有异常
     */
    public void addOverTime(Integer uid,Integer sign)throws Exception;

    //个人考勤情况
    public List<Attendance> atTable(Integer uid,String username ,String name)throws Exception;

}
